package com.tqjc.system.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @description: 扫描仪电源plc点位信息枚举
 * @Author: 86195
 * @Date: 2024/2/28 16:00
 **/

@NoArgsConstructor
@AllArgsConstructor
@Getter
public enum ScannerElePowerPLCInfoEnum {


    WASTE_STEEL_1(ScannerInfoEnum.SCANNER_WASTE_STEEL_AREA_1.getDesc(),new Object[]{"M601",0,CarPLCInfoEnum.WASTE_STEEL_NO_1.getMacSN(),"1号废钢跨天车库区扫描仪电源"}
            ,"废钢1号车库区扫描仪电源点位信息"),

    WASTE_STEEL_2(ScannerInfoEnum.SCANNER_WASTE_STEEL_AREA_2.getDesc(),new Object[]{"M601",0,CarPLCInfoEnum.WASTE_STEEL_NO_2.getMacSN(),"2号废钢跨天车库区扫描仪电源"}
            ,"废钢2号车库区扫描仪电源点位信息"),

    DREGS_STEEL_1(ScannerInfoEnum.SCANNER_DREGS_STEEL_AREA_1.getDesc(),new Object[]{"M601",0,CarPLCInfoEnum.DREGS_STEEL_NO_1.getMacSN(),"1号渣钢跨天车库区扫描仪电源"}
            ,"渣钢1号车库区扫描仪电源点位信息"),

    DREGS_STEEL_2(ScannerInfoEnum.SCANNER_DREGS_STEEL_AREA_2.getDesc(),new Object[]{"M601",0,CarPLCInfoEnum.DREGS_STEEL_NO_2.getMacSN(),"2号渣钢跨天车库区扫描仪电源"}
            ,"渣钢2号车库区扫描仪电源点位信息");


    private String scannerKey;

    //地址  数据类型   macSN  标签
    private Object[] plcInfoArray;

    private String desc;


    public static ScannerElePowerPLCInfoEnum getEnumByScannerKey(String scannerKey){
        for (ScannerElePowerPLCInfoEnum value : ScannerElePowerPLCInfoEnum.values()) {
            if(value.getScannerKey().equals(scannerKey)){
                return value;
            }
        }
        return null;

    }




}
